<template>
  <img :src="url" :style="{
    width: size + 'px',
    height: size + 'px',
  }" class="avatar-img" alt="">
</template>

<script>
export default {
  props: {
    url: {
      type: String, //类型
      required: true //必传
    },
    size: {
      type: Number,
      default: 150 //默认值
    }
  }
}
</script>

<style scoped>
.avatar-img {
  display: block;
  border-radius: 50%;
}
</style>